package com.neutech.maplestory.entity;

import com.neutech.maplestory.client.MapleStoryClient;
import com.neutech.maplestory.util.ImageUtil;

import java.awt.*;

public class Portal extends AbstractMapleStoryObject{
    public static Image[] imgs = new Image[100];
    static {
        for (int i = 0; i < 8; i++) {
            imgs[i] = ImageUtil.getImage("portal" + i);
        }
    }
    public Portal(){

    }
    public Portal(MapleStoryClient msc,int x,int y){
        this.msc = msc;
        this.x = x;
        this.y = y;
    }
    public int count;
    public int step;
    @Override
    public void draw(Graphics g) {
        if (count++ % 3 == 0){
            g.drawImage(imgs[step++ % 8],x,y,null);
        }else {
            g.drawImage(imgs[step % 8],x,y,null);
        }
    }
}
